home *** CD-ROM | disk | FTP | other *** search
/ Winzipper / Winzipper_ISO.iso / nt4.0 server / NCPARAM.IN_ / ncparam.inf
INI File  |  1996-07-18  |  9KB  |  248 lines

  1. [InitGlobals]
  2. !STF_NCDETECT         = "NO"
  3. !STF_NCOPTION         = ""
  4. !STF_NCDETCARD        = 0
  5. !STF_NCDETINFO        = {}
  6. [Param_SetGlobals]
  7.    Read-syms InitGlobals
  8.    return
  9. [Param_ControlDetection]
  10.     Set DtMode = $($0)
  11.     Debug-Output "NCPARAM.INF: calling "$(DtMode)" wrapper"
  12.     Set FLibraryErrCtl = 1
  13.     LibraryProcedure StartResult $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), $(DtMode)
  14.     Set FLibraryErrCtl = 0
  15.     Set StartStatus = *($(StartResult),1)
  16.     Debug-Output "NCPARAM.INF: "$(DtMode)" status was: "$(StartStatus)
  17.     Ifint $(StartStatus) == 0
  18.         Set ReturnStatus = STATUS_SUCCESSFUL
  19.     Else
  20.         Set ReturnStatus = STATUS_FAILED
  21.     Endif
  22.     Return $(ReturnStatus)
  23. [Param_DetectCard]
  24.     Debug-Output "NCPARAM.INF: calling DTCARD wrapper"
  25.     Set FLibraryErrCtl = 1
  26.     LibraryProcedure DetectResult $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), DTCARD
  27.     Set FLibraryErrCtl = 0
  28.     Set Status = *($(DetectResult),1)
  29.     Debug-Output "NCPARAM.INF: DTCARD status was: "$(Status)
  30.     Ifint $(DetectStatus) == 0
  31.         Set DtOption  = *($(DetectResult),2)
  32.         Set DtIndex   = *($(DetectResult),3)
  33.         Debug-Output "NCPARAM.INF: card found is type "$(DtOption)", index "$(DtIndex)
  34.     Endif
  35.     Return $(DetectResult)
  36. :               $1:  Parameter control list of the form:
  37. [Param_BuildTypeLists]
  38.     Set Option = $($0)
  39.     Set OptList = $($1)
  40.     Set Result1 = {}
  41.     Set Result2 = {}
  42.     Set !STF_NC_PARAMS = {}
  43.     Set !STF_NC_PNAMES = {}
  44.     Set Status = STATUS_FAILED
  45.     Debug-Output "NCPARAM.INF: Querying parameters for netcard type: "$(Option)
  46.     Set FLibraryErrCtl = 1  
  47.     LibraryProcedure NcpaResult $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), DTPARAMS, $(Option)
  48.     Set FLibraryErrCtl = 0
  49.     Set ErrorStatus = *($(NcpaResult),1)
  50.     Debug-Output "NCPARAM.INF: DTPARAMS status was: "$(ErrorStatus)
  51.     Ifint $(ErrorStatus) != 0
  52.         Goto PMTL_Return
  53.     Endif
  54.     Set DllList = *($(NcpaResult),2)
  55.     Debug-Output "NCPARAM.INF: DLL param type list is: "$(DllList)
  56.     Set NbrOptions = 0
  57.     Set NbrFound = 0
  58.     ForListDo $(OptList)
  59.         Set-add NbrOptions = $(NbrOptions),1
  60.         Set Found = 0
  61.         Set Plist = $($)
  62.         Set Pname = *($(Plist),1)
  63.         Set PlistVar = *($(Plist),2)
  64.         Set Pvar = *($(Plist),3)
  65.         Set Dentry = {}
  66.         ForListDo $(DllList)
  67.             Set Dlist = $($)
  68.             Set Dname = *($(Dlist),1)
  69.             Set Dvlist = *($(Dlist),4)
  70.             Ifstr(i) $(Dname) == $(Pname)
  71.                 Set Found = 1
  72.                 Set Dvalue = *($(Dvlist),1)
  73.                 Set Dentry = $(Dlist)
  74.                 Ifstr(i) $(PlistVar) != NONE
  75.                     Set !p:$(PlistVar) = $(Dvlist)
  76.                     Debug-Output "NCPARAM.INF: DLL param "$(Pname)" list var "$(PlistVar)" set"
  77.                 Endif
  78.             Endif
  79.         EndForListDo
  80.         Set-add NbrFound = $(NbrFound),$(Found)
  81.         Ifint $(Found) == 1
  82.             Set Result1 = >($(Result1),$(Dentry))
  83.             Set Result2 = >($(Result2),{$(Pname),$(Pvar),$(Dvalue)})
  84.         Else
  85.             Debug-Output "NCPARAM.INF: parameter "$(Pname)" not in DLL for "$(Option)
  86.         Endif
  87.     EndForListDo
  88.     Ifint $(NbrOptions) == $(NbrFound)
  89.         Set Status = STATUS_SUCCESSFUL
  90.         Set !STF_NC_PARAMS = $(Result1)
  91.         Set !STF_NC_PNAMES = $(Result2)
  92.         Debug-Output "NCPARAM.INF: Netcard list STF_NC_PARAMS for "$(Option)" is: "$(Result1)
  93.         Debug-Output "NCPARAM.INF: Netcard list STF_NC_PNAMES for "$(Option)" is: "$(Result2)
  94.     Endif
  95. PMTL_Return =+
  96.     Return $(Status)
  97. [Param_SaveValues]
  98.    Set Plist = {}
  99.    ForListDo $(!STF_NC_PNAMES)
  100.        Set Pelem = $($)
  101.        Set Name = *($(Pelem),1)
  102.        Set Qvar = *($(Pelem),2)
  103.        Set Qvalue = *($(Pelem),3)
  104.        Ifstr(i) $(Qvar) != "NONE"
  105.            Set Qvalue = $(!p:$(Qvar))
  106.            Set Plist = >($(Plist),{$(Name),$(Qvar),$(Qvalue)})
  107.        Endif
  108.    EndForListDo
  109.    Return $(Plist)
  110. [Param_DiffValues]
  111.    Set Plist = {}
  112.    ForListDo $($0)
  113.        Set Pelem = $($)
  114.        Set Name = *($(Pelem),1)
  115.        Set Qvar = *($(Pelem),2)
  116.        Set Qvalue = *($(Pelem),3)
  117.        Ifstr(i) $(Qvar) != "NONE"
  118.            Set QnewValue = $(!p:$(Qvar))
  119.            Ifint $(QnewValue) != $(Qvalue)
  120.                Debug-Output "NCPARAM.INF: Param_DiffValues: param "$(Name)" value has changed"
  121.                Set Plist = >($(Plist),{$(Name),$(Qvar),$(QnewValue)})
  122.            Endif
  123.        Endif
  124.    EndForListDo
  125.    Return $(Plist)
  126. [Param_SetDefaults]
  127.    Set QueryList = $($0)
  128.    Debug-Output "NCPARAM.INF: Param_SetDefaults, QueryList = "$(QueryList)
  129.    ForListDo $(!STF_NC_PNAMES)
  130.        Set Pelem = $($)
  131.        Set Name = *($(Pelem),1)
  132.        Set Qvar = *($(Pelem),2)
  133.        Set Qvalue = *($(Pelem),3)
  134.        ForListDo $(QueryList)
  135.            Set Qname = *($($),1)
  136.            Ifstr(i) $(Qname) == $(Name)
  137.                Debug-Output "NCPARAM.INF: Param_SetDefaults: default override for param "$(Qname)
  138.                Set Qvalue = *($($),2)
  139.            Endif
  140.        EndForListDo
  141.        Ifstr(i) $(Qvar) != "NONE"
  142.            Debug-Output "NCPARAM.INF: Param_SetDefaults: setting "$(Qvar)" to "$(Qvalue)
  143.            Set !p:$(Qvar) = $(Qvalue)
  144.        Endif
  145.    EndForListDo
  146.    Return
  147. [Param_QueryCard]
  148.     Set CardIndex = $($0)
  149.     Set Status = STATUS_SUCCESSFUL
  150.     Set ResultList = {}
  151.     Debug-Output "OEMNADDE.INF: Querying parameters for netcard "$(CardIndex)
  152.     Set FLibraryErrCtl = 1  
  153.     LibraryProcedure NcpaResult $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), DTQUERY, $(CardIndex)
  154.     Set FLibraryErrCtl = 0
  155.     Set ErrorStatus = *($(NcpaResult),1)
  156.     Debug-Output "NCPARAM.INF: DTQUERY status was: "$(ErrorStatus)
  157.     Ifint $(ErrorStatus) != 0
  158.         Set Status = STATUS_FAILED
  159.     Else
  160.         Set ResultList = *($(NcpaResult),2)
  161.     Endif
  162.     Return $(Status) $(ResultList)
  163. [Param_VerifyCard]
  164.     Set CardIndex = $($0)
  165.     Set Status = STATUS_FAILED
  166.     Set VerifyList = {}
  167.     ForListDo $(!STF_NC_PNAMES)
  168.         Set Pelem = $($)
  169.         Set Name = *($(Pelem),1)
  170.         Set Qvar = *($(Pelem),2)
  171.         Set Qvalue = $(!p:$(Qvar))
  172.         Ifstr(i) $(Qvalue) != ""
  173.             Debug-Output "NCPARAM.INF: VerifyCard: "$(Qvar)" = "$(Qvalue)
  174.             Set VerifyList = >($(VerifyList),{$(Name),$(Qvalue)})
  175.         Endif
  176.     EndForListDo
  177.     Debug-Output "NCPARAM.INF: Verifying parameters for netcard "$(CardIndex)
  178.     Debug-Output "NCPARAM.INF: Parameters are: "$(VerifyList)
  179.     Set FLibraryErrCtl = 1  
  180.     LibraryProcedure NcpaResult $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), DTVERIFY, $(CardIndex), $(VerifyList)
  181.     Set FLibraryErrCtl = 0
  182.     Set ErrorStatus = *($(NcpaResult),1)
  183.     Debug-Output "NCPARAM.INF: DTVERIFY status was: "$(ErrorStatus)
  184.     ifstr(i) $(!STF_GUI_UNATTENDED) == "YES"
  185.         Set Status = STATUS_SUCCESSFUL
  186.     else
  187.         Ifint $(ErrorStatus) == 0
  188.             Set Status = STATUS_SUCCESSFUL
  189.         Endif
  190.     endif
  191.     Return $(Status)
  192. [Param_VerifyResources]
  193.     Set DiffParamList = $($0)
  194.     Ifstr(i) $(DiffParamList) == {}
  195.         Set Status = STATUS_SUCCESSFUL
  196.         Goto PVR_Return
  197.     Endif
  198.     Set Status = STATUS_FAILED
  199.     Set VerifyList = {}
  200.     ForListDo $(DiffParamList)
  201.         Set Pelem = $($)
  202.         Set Name = *($(Pelem),1)
  203.         Set Qvar = *($(Pelem),2)
  204.         Set Qvalue = $(!p:$(Qvar))
  205.         Ifstr(i) $(Qvalue) != ""
  206.             Debug-Output "NCPARAM.INF: VerifyResources: "$(Qvar)" = "$(Qvalue)
  207.             Set VerifyList = >($(VerifyList),{$(Name),$(Qvalue)})
  208.         Endif
  209.     EndForListDo
  210.     Debug-Output "NCPARAM.INF: VerifyResources: Claiming changed resource parameter values"
  211.     Debug-Output "NCPARAM.INF: Parameters are: "$(VerifyList)
  212.     Set FLibraryErrCtl = 1  
  213.     LibraryProcedure NcpaResult $(!NCPA_HANDLE), CPlSetup $(!STF_HWND), DTCLAIM, $(VerifyList)
  214.     Set FLibraryErrCtl = 0
  215.     Set ErrorStatus = *($(NcpaResult),1)
  216.     Debug-Output "NCPARAM.INF: DTCLAIM status was: "$(ErrorStatus)
  217.     Ifint $(ErrorStatus) == 0
  218.         Set Status = STATUS_SUCCESSFUL
  219.     Endif
  220. PVR_Return = +
  221.     Return $(Status)
  222. [Param_ParameterConfidence]
  223.     Set LowestConf = 100
  224.     Set Status = STATUS_SUCCESSFUL
  225.     Set LowestParam = ""
  226.     ForListDo $(!STF_NC_PARAMS)
  227.         Set Ptype = *($($),2)
  228.         Set Pconf = *($($),3)
  229.         Ifint $(Ptype) < 2
  230.             Ifint $(Pconf) < $(LowestConf)
  231.                 Set LowestConf = $(Pconf)
  232.                 Set LowestParam = *($($),1)
  233.             Endif
  234.         Endif
  235.     EndForListDo
  236.     Ifint $(LowestConf) < 70
  237.         Set Status = STATUS_FAILED
  238.         Debug-Output "NCPARAM.INF: parameter "$(LowestParam)" cannot be adequately detected"
  239.     Endif
  240.     Return $(Status)
  241. [HexListFromDecList]
  242.     Set HexList = {}
  243.     ForListDo $($0)
  244.         Set-DecToHex HexValue = $($)
  245.         Set HexList = >($(HexList),$(HexValue))
  246.     EndForListDo
  247.     Return $(HexList)
  248.